<h3><?php
$lang =$this->session->userdata("lang");
 echo $title; ?></h3>


<?php echo form_open('admin/promotion/request'); ?>

<div class="control1">

<?php

	//add button

  echo link_image('admin/promotion/create', 'images/admin/button_add.png');

  

  //delete button

  $data = array('name' => 'delete', 'value' => '', 'id' => 'delete');

  echo form_submit($data);

 

  //show field

  $data = array('name' => 'show', 'value' => '', 'id' => 'show');	

  echo form_submit($data);
//$_SESSION['row_number']
  $data = array('name' => 'row_number', 'value' => $_SESSION['row_number'], 'id' => 'show_number');	

  echo form_input($data);

?>

</div><!--control1 end-->
<table class="default">

<?php

	if (is_array($result) )

	{

		//title

		echo '<tr >';

		echo '<th width="60" >';
			echo '&nbsp;',form_checkbox('all'),'&nbsp;All';
		echo '</th>';
//    echo '<th width="70">Active</th>';

   // echo '<th width="90">Code</th>';
		
		echo '<th width="200">'.$this->lang->line('promotion_name').'</th>';
			echo '<th width="400">'.$this->lang->line('promotion_detail').'</th>';
	//			echo '<th width="200">Product Conponent Chinese</th>';
	
		//echo '<th width="100">Info</th>';

		echo '</tr>';

		

		//print

		foreach ($result as $row)

		{

			echo '<tr>';



			//action

			echo '<td>';

			echo form_checkbox('select_id[]', $row['id']);

			echo '&nbsp;';

			echo anchor('admin/promotion/update/'.$row['id'], 'Edit');

			echo '</td>';



   
		$name = unserialize($row['name']);
			
		$info = unserialize($row['content']);


      //Code

	//		echo '<td>';

   //   echo $row['promotion_id'];

	//		echo '</td>';

      //vietnamese name

			echo '<td>';

    
      echo $name[$lang];


			echo '</td>';
		
		//english name	
			echo '<td>';

      
      echo "<div class='scroll3'>".html_entity_decode($info[$lang],ENT_QUOTES,"UTF-8")."</div>";


			echo '</td>';

	//chinese name	
	//		echo '<td>';

     
  //    echo $name['cn'];


		//	echo '</td>';


		

			

			echo '</tr>';

		}

	}

	else

	{

		echo 'Data does not exist';

	}

?>

</table><!--end main content-->



<?php

	echo form_close(); //FORM END

	

	//page
	
	echo '<div class="page">'.$page.'</div>';

?>